<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- 
		qhf这个自定义属性没什么用
		如果要修改它的值，需要使用
		testNode.setAttribute("qhf","111")
		这样修改很烦
		 -->
		<!-- <div id="test" qhf="qhf"></div> -->
		<div id="test" data-qhf="qhf" data-atguigu-qhf="qhf2"></div>
	</body>
	<script type="text/javascript">
		// debugger
		var testNode = document.querySelector("#test");
		console.log(testNode.dataset.qhf)//打印"qhf"
		console.log(testNode.dataset.atguiguQhf)//打印"qhf2"
		testNode.dataset.atguiguQhf=333//设置
	</script>
</html>
